<style>
.checkoutform table {
	background: #fff;
	
}
.square-red label{cursor:pointer;}
</style>
<form class="checkoutform" action="{:U('update')}" method="post">
  <input name="role_id" type="hidden" value="{$role.id}" />
  <table class="" width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
    <volist name="all_node" id="vo">
      <tr>
        <td align="center" class="hidden"><div class="icheck" style="display:inline-block;">
            <div class="square-red single-row">
              <input 
                            checked="checked"
                            type="checkbox" name="node_id[]" id="node_id[]" class="sall" value="{$vo.id}_{$vo.level}" />
              <label onClick="$(this).parent().find('.iCheck-helper').trigger('click');">{$vo.title}</label>
            </div>
          </div></td>
        <td style="border-width:0; padding:0;"><table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:0;">
            <volist name="vo['sub']" id="svo">
              <tr>
                <td align="left" width="150"><div class="icheck" style="display:inline-block;">
                    <div class="square-red single-row"> <input onChange="selectsub(this);" type="checkbox" 
                      <eq name="svo['role_id']" value="$role['id']">checked="checked"</eq>
                      name="node_id[]" id="node_id[]" class="sall" value="{$svo.id}_{$svo.level}" />
                      <label onClick="$(this).parent().find('.iCheck-helper').trigger('click');">{$svo.title}</label>
                    </div>
                  </div></td>
                <td><volist name="svo['sub']" id="ssvo">
                    <div class="icheck" style="display:inline-block;">
                      <div class="square-red single-row"> <input type="checkbox" 
                        <eq name="ssvo['role_id']" value="$role['id']">checked="checked"</eq>
                        name="node_id[]" id="node_id[]" class="sall" value="{$ssvo.id}_{$ssvo.level}" />
                        <label onClick="$(this).parent().find('.iCheck-helper').trigger('click');">{$ssvo.title}</label>
                      </div>
                    </div>
                  </volist></td>
              </tr>
            </volist>
          </table></td>
      </tr>
    </volist>
  </table>
</form>
<script>
    function selectsub(e){
		if($(e).prop('checked')== true){
			$(e).parent().parent().parent().parent().next().find('input').iCheck('check');
		}else{
			$(e).parent().parent().parent().parent().next().find('input').iCheck('uncheck');
		}
	}
</script>